package org.github.manx98.jlibhac;

import org.github.manx98.jlibhac.common.keys.ExternalKeyReader;
import org.github.manx98.jlibhac.common.keys.KeySet;

import java.io.IOException;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/3 0:13
 */
public class VirtualFileSystem {
    /**
     * 从prod.keys文件中加载密钥
     *
     * @param keyFile 密钥文件路径
     * @return 密钥对象
     * @throws IOException 读取错误
     */
    public static KeySet reloadKeySet(String keyFile) throws IOException {
        KeySet keySet = KeySet.createDefaultKeySet();
        ExternalKeyReader.readKeyFile(keySet, keyFile);
        return keySet;
    }
}
